﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DayuCode.Designer.Entity
{
    public class CodeItem
    {
		public string Code { get; set; }
		public int? Status { get; set; }
		public long? Ordnum { get; set; }
		public string ParentCode { get; set; }
		public string Name { get; set; }

        public CodeItem()
        {

        }

        public CodeItem(string code, string name)
        {
            Code = code;
            Name = name;
        }

        public override string ToString()
        {
            return Name;
        }

        public override bool Equals(object obj)
        {
            CodeItem oth = obj as CodeItem;
            if (oth == null) return false;
            return string.Equals(Code, oth.Code);
        }

        public override int GetHashCode()
        {
            if (Code == null) return 0;
            return Code.GetHashCode();
        }
    }
}
